package cc.linker.steplink.crm.response;

import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import javax.servlet.http.HttpServletResponse;

@RestControllerAdvice
public class ControllerException {
    @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
    public Object exception(HttpServletResponse response) {
        return ResponseGenerator.error();
    }
}